<!--
/**
 * This file is part of the smilText parser implemented in JavaScript,
 *
 * Copyright (C) 2003-2009 Stichting CWI, 
 * Science Park 123, 1098 XG Amsterdam, The Netherlands.
 *
 * smilText parser in JavaScript is free software; you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation; either version 2.1 of the License, or
 * (at your option) any later version.
 *
 * smilText parser in JavaScript is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with smilText parser in JavaScript; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 */

/**
 @version 1.0
 @author <a href="mailto:rlaiola@cwi.nl">Rodrigo Laiola Guimaraes</a>
*/
-->

<HTML>
<HEAD>
<script type="text/javascript" src="../src/scripts/jsoner.commons.js"></script>
<script type="text/javascript" src="../src/scripts/com.iskitz.ajile.1.2.1.js"></script>
<script type="text/javascript" src="../src/scripts/cwi.adt.js"></script>
<script type="text/javascript" src="../src/scripts/cwi.util.js"></script>
<script type="text/javascript" src="../src/scripts/cwi.smilText.Time.js"></script>
<script type="text/javascript" src="../src/scripts/cwi.smilText.js"></script>
</HEAD>
<BODY>

<H2>smilText Examples: TextStyling Module</H2>

<!-- import smilText data onload event -->
<H3>Example 9: Hello World in DIV, P and SPAN elements</H3>
<DIV id="region9">
<script>
var doc9 = cwi.smilText.Parser.parseFile('examples/example9.xml', 'region9');
doc9.play();
</script>
</DIV>
<A HREF="javascript:doc9.play()">Play</A>
<A HREF="javascript:doc9.pause()">Pause</A>
<A HREF="javascript:doc9.stop()">Stop</A>
<br/>
<A HREF="examples/example9.xml">view smilText file</A>

<!-- import smilText data onload event -->
<H3>Example 10: Example 9 with textBackgroundColor attribute</H3>
<DIV id="region10">
<script>
var doc10 = cwi.smilText.Parser.parseFile('examples/example10.xml', 'region10');
doc10.play();
</script>
</DIV>
<A HREF="javascript:doc10.play()">Play</A>
<A HREF="javascript:doc10.pause()">Pause</A>
<A HREF="javascript:doc10.stop()">Stop</A>
<br/>
<A HREF="examples/example10.xml">view smilText file</A>

<!-- import smilText data onload event -->
<H3>Example 11: Example 9 with textColor attribute</H3>
<DIV id="region11">
<script>
var doc11 = cwi.smilText.Parser.parseFile('examples/example11.xml', 'region11');
doc11.play();
</script>
</DIV>
<A HREF="javascript:doc11.play()">Play</A>
<A HREF="javascript:doc11.pause()">Pause</A>
<A HREF="javascript:doc11.stop()">Stop</A>
<br/>
<A HREF="examples/example11.xml">view smilText file</A>

<!-- import smilText data onload event -->
<H3>Example 12: Example 9 with textStyle and textWeight attributes</H3>
<DIV id="region12">
<script>
var doc12 = cwi.smilText.Parser.parseFile('examples/example12.xml', 'region12');
doc12.play();
</script>
</DIV>
<A HREF="javascript:doc12.play()">Play</A>
<A HREF="javascript:doc12.pause()">Pause</A>
<A HREF="javascript:doc12.stop()">Stop</A>
<br/>
<A HREF="examples/example12.xml">view smilText file</A>

<!-- import smilText data onload event -->
<H3>Example 13: Example 9 with textFontSize and textFontFamily attributes</H3>
<DIV id="region13">
<script>
var doc13 = cwi.smilText.Parser.parseFile('examples/example13.xml', 'region13');
doc13.play();
</script>
</DIV>
<A HREF="javascript:doc13.play()">Play</A>
<A HREF="javascript:doc13.pause()">Pause</A>
<A HREF="javascript:doc13.stop()">Stop</A>
<br/>
<A HREF="examples/example13.xml">view smilText file</A>

<!-- import smilText data onload event -->
<H3>Example 14: Example 9 with textWritingMode and textAlign attributes</H3>
<H4 style='color:red'>Note: textWritingMode will be available in CSS3. So far only IE supports 'tb-rl' and 'lr-tb'</H4>
<DIV id="region14">
<script>
var doc14 = cwi.smilText.Parser.parseFile('examples/example14.xml', 'region14');
doc14.play();
</script>
</DIV>
<A HREF="javascript:doc14.play()">Play</A>
<A HREF="javascript:doc14.pause()">Pause</A>
<A HREF="javascript:doc14.stop()">Stop</A>
<br/>
<A HREF="examples/example14.xml">view smilText file</A>

<!-- import smilText data onload event -->
<H3>Example 15: textDirection attribute</H3>
<DIV id="region15">
<script>
var doc15 = cwi.smilText.Parser.parseFile('examples/example15.xml', 'region15');
doc15.play();
</script>
</DIV>
<A HREF="javascript:doc15.play()">Play</A>
<A HREF="javascript:doc15.pause()">Pause</A>
<A HREF="javascript:doc15.stop()">Stop</A>
<br/>
<A HREF="examples/example15.xml">view smilText file</A>

<!-- import smilText data onload event -->
<H3>Example 16: textMode = replace</H3>
<DIV id="region16">
<script>
var doc16 = cwi.smilText.Parser.parseFile('examples/example16.xml', 'region16');
doc16.play();
</script>
</DIV>
<A HREF="javascript:doc16.play()">Play</A>
<A HREF="javascript:doc16.pause()">Pause</A>
<A HREF="javascript:doc16.stop()">Stop</A>
<br/>
<A HREF="examples/example16.xml">view smilText file</A>

<!-- import smilText data onload event -->
<H3>Example 17: textPlace attribute</H3>
<H4 style='color:red'>Note: I still do not know how to do it.</H4>

<!-- import smilText data onload event -->
<H3>Example 18: textStyle and textStyling elements (+ some timing to make it fun).</H3>
<DIV id="region18">
<script>
var doc18 = cwi.smilText.Parser.parseFile('examples/example18.xml', 'region18');
doc18.play();
</script>
</DIV>
<A HREF="javascript:doc18.play()">Play</A>
<A HREF="javascript:doc18.pause()">Pause</A>
<A HREF="javascript:doc18.stop()">Stop</A>
<br/>
<A HREF="examples/example18.xml">view smilText file</A>

<!-- smilText data inside html -->
<H3>Example 19: Testing xml:space. smilText code inside html.</H3>
<H4 style='color:red'>Note: IE can't read smilText tags inside html. Moreover, even in a external file IE doesn't keep whitespaces properly (Problem reported in some foruns). Finally, for xml:space=preserve and textWrapOption=wrap I've used a CSS style property called whiteSpace='pre-wrap' and it is not supported by IE. Remove this example from the html file to test the examples above.</H4>
<DIV id="region19">
	<smilText xml:space='preserve'>
	
	This text has xml:space=preserve.		As you can       see     
it 				is not well formated
	!
	</smilText>
</DIV>
<A HREF="javascript:docs[0].play()">Play</A>
<A HREF="javascript:docs[0].pause()">Pause</A>
<A HREF="javascript:docs[0].stop()">Stop</A>
<br/><br/>

<DIV id="region191">
	<smilText xml:space='default'>
	
	This text has xml:space=default. As you can       see     
	it 				is well formated
	!
	</smilText>
</DIV>
<A HREF="javascript:docs[1].play()">Play</A>
<A HREF="javascript:docs[1].pause()">Pause</A>
<A HREF="javascript:docs[1].stop()">Stop</A>
<br/>

<script>
var docs = cwi.smilText.Parser.parseHTML();
for (i = 0; i < docs.length; i++) {
	docs[i].play();
}
</script>

</BODY>
</HTML>